﻿@{
    ViewBag.Title = "Details"; 
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    //父传子示例
    function initForm(data) {
        layui.use(['common'], function () {
            var common = layui.common;
            common.val('adminform', data);
        });
    }
    layui.use(['jquery', 'form', 'laydate', 'optimizeSelectOption', 'common'], function () {
        var form = layui.form,
            $ = layui.$,
            common = layui.common,
            laydate = layui.laydate;
        //权限字段
        common.authorizeFields('adminform');
        //此处需修改
        //类型为时间时
        //laydate.render({
            //elem: '#F_Birthday'
            //, btns: ['clear', 'now']
            //, trigger: 'click',
            //format: 'yyyy-MM-dd',
        //});

        $(function () {
            initControl();
            common.setReadOnly('adminform');
            form.render();
       });
        wcLoading.close();
       function initControl() {
           //此处需修改
           //绑定数据源
           //类型为下拉框时
       }
   });
</script>

<body>
    <div class="layuimini-container">
        <div class="layuimini-main">
            <div class="layui-form layuimini-form" lay-filter="adminform">
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">类别名称</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_FullName" name="F_FullName" autocomplete="off" lay-verify="required" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">上级</label>
                    <div class="layui-input-block">
                        <select id="F_ParentId" name="F_ParentId" lay-filter="F_ParentId" lay-verify="required" lay-search>
                            <option value="0">父级</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">排序</label>
                    <div class="layui-input-block">
                        <input type="number" pattern="[0-9]*" id="F_SortCode" name="F_SortCode" lay-verify="required" value="99" autocomplete="off" class="layui-input ">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">描述</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_Description" name="F_Description" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">链接地址</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_LinkUrl" name="F_LinkUrl" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">图片地址</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_ImgUrl" name="F_ImgUrl" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">Seo标题</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_SeoTitle" name="F_SeoTitle" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">Seo关键字</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_SeoKeywords" name="F_SeoKeywords" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">Seo描述</label>
                    <div class="layui-input-block">
                        <input type="text" id="F_SeoDescription" name="F_SeoDescription" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item layui-hide">
                    <label class="layui-form-label">选项</label>
                    <div class="layui-input-block">
                        <input id="F_IsTop" name="F_IsTop" type="checkbox" value="true" title="是否置顶">
                        <input id="F_IsHot" name="F_IsHot" type="checkbox" value="true" title="是否热门">
                        <input id="F_EnabledMark" name="F_EnabledMark" type="checkbox" value="true" checked="checked" title="是否启用">
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

